package io.demo.command;

/**
 * @author create by zhangpengfei at 2021/9/29 19:38
 */

public class LightOffCommand implements Command{
    Light light;

    public LightOffCommand(Light light) {
        this.light = light;
    }

    @Override
    public void execute() {
        light.off();
    }

    @Override
    public void undo() {
        light.on();
    }
}
